package com.yth.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;

/**
 * <p>
 * 监听事件
 * </p>
 * 部分Spring内置的事件：
 * <ul>
 *      <li>ContextRefreshedEvent   </li>
 *      <li>ContextStartedEvent     </li>
 *      <li>ContextStoppedEvent     </li>
 *      <li>ContextClosedEvent      </li>
 *      <li>RequestHandledEvent     </li>
 * </ul>
 *
 * @author yutianhong
 * @version 1.0
 * @since 2023/09/05 15:54
 */
@Slf4j
public class TestApplicationReadyEventListener implements ApplicationListener<ApplicationReadyEvent> {
    @Override
    public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
        log.info("[ApplicationListener<ApplicationReadyEvent>::onApplicationEvent]");
    }
}
